<?php
$filename="shuju/2/index.html";
// $handle = fopen($filename,"w");
// $string = "f发达地方";
// fwrite($handle, $string);
// fclose($handle);
// echo "写入成功！";

echo basename($filename);
echo "<br>";
echo basename($filename,".html");
echo "<br>";
echo dirname($filename);

$info = pathinfo($filename);
echo "<pre>";
print_r($info);
echo "<pre>";
?>